<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <title>glasses后台管理首页</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <jsp:include page="inc/head.jsp"/>
    <!-- 当前页面的样式 -->
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/css/index.css"/>
</head>
<body id="layout" class="easyui-layout">
<!-- 头部标题 -->
<div id="hd" data-options="region:'north',border:false">
    <div class="hd-wrap clearfix">
        <div class="toolbar">
            <div class="login-info clearfix">
                <div class="welcome clearfix"><span>欢迎您,</span><span href="javascript:" class="user-name">超级管理员</span>
                </div>
            </div>
            <%--<div class="tool clearfix">--%>
                <%--<a href="javascript:" id="resetPwd" class="help-btn">帮助</a>--%>
                <%--<a href="${pageContext.request.contextPath}/auth/index" class="quit-btn exit">退出</a>--%>
            <%--</div>--%>
        </div>
        <div class="top-light"></div>
        <img class="logo" src="${pageContext.request.contextPath}/static/image/logo.png"/>
        <ul class="main-nav clearfix" id="rootMenu"></ul>
    </div>
</div>

<!-- 左侧导航 -->
<div data-options="region:'west',title:'功能菜单栏', fit:false" style="width:165px;">
    <!--  导航内容 -->
    <div id="nav" class="easyui-accordion" data-options="multiple:true,animate:true" border="false">
    </div>
</div>

<!-- 内容tabs -->
<div id="center" data-options="region:'center'">
    <div id="tabs" class="easyui-tabs" data-options="fit:true,border:false,tools:'#tab-tools'">
        <div title="首页" style="padding-top:1px;display:block;overflow:hidden;">
            <img id="publicMain" src="${pageContext.request.contextPath}/static/image/index_pic.jpg" width="100%"
                 height="100%">
        </div>
    </div>
    <div id="tab-tools">
        <a href="javascript:void(0)" id="hideHeadBtn" class="easyui-linkbutton"
           data-options="plain:true,iconCls:'icon-remove'">隐藏头部</a>
    </div>
</div>

<!-- 右键tabs菜单 -->
<div id="mm" class="easyui-menu" style="width:150px;">
    <div id="mm-tabupdate">刷新</div>
    <div class="menu-sep"></div>
    <div id="mm-tabclose">关闭</div>
    <div id="mm-tabcloseall">全部关闭</div>
    <div id="mm-tabcloseother">除此之外全部关闭</div>
    <div class="menu-sep"></div>
    <div id="mm-tabcloseright">当前页右侧全部关闭</div>
    <div id="mm-tabcloseleft">当前页左侧全部关闭</div>
    <div class="menu-sep"></div>
    <div id="mm-exit">退出</div>
</div>

<!-- 页脚信息 -->
<div data-options="region:'south',border:false"
     style="height:20px; background:#F3F3F3; padding:2px; vertical-align:middle;">
    <span id="sysVersion">系统版本：V1.0</span> <span id="nowTime"></span>
    <span style="font-family:arial;display: inline-block; width:70%;text-align: center">&copy; CopyRight 2017-2027, 扬仔, Inc.All Rights Reserved.</span>
</div>

<jsp:include page="inc/foot.jsp"/>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/glassesJS/manage_index.js"></script>
<script type="text/javascript">

    $(function () {
        $.ajax({
            type: "GET",
            // url: ctx+"/static/json/serverurl.json",//服务器
            url: ctx+"/static/json/url.json",//本地
            dataType: "json",
            success: function (data) {
                var menus = transformTozTreeFormat(data);//获取所有菜单
                //设置导航菜单，并设置第一个默认选中
                if (menus) {
                    $.each(menus[0].children, function (idx, obj) {
                        if (obj.display == 1) {
                            var rootMenu = $("<li><a href='javascript:'>" + obj.name + "</a></li>");
                            $("#rootMenu").append(rootMenu);
                            $(rootMenu).on('click', function () {
                                InitLeftMenu(obj);
                            });
                        }
                    });
                    $("#rootMenu>li:first").addClass('current');
                    InitLeftMenu(menus[0].children[0]);
                }
            }
        });
    });
</script>
</body>
</html>

